package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.Message;
import cn.wolfcode.crm.mapper.MessageMapper;
import cn.wolfcode.crm.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MessageServiceImpl implements IMessageService{
    @Autowired
    private MessageMapper mapper;


    public void save(Message message) {
        mapper.insert(message);
    }

    public void delete(Long id) {
        mapper.deleteByPrimaryKey(id);
    }

    public void update(Message message) {
        mapper.updateByPrimaryKey(message);
    }

    public Message get(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    public List<Message> list() {
        return mapper.selectAll();
    }

    public List<Message> queryCheckMessage() {
        return mapper.queryCheckMessage();
    }


}
